import ajax from './index'

export function cardPage(query) {
    return ajax({
        url: '/backend/card',
        method: 'get',
        params: query
    });
}
export function cardExport(query) {
    return ajax({
        url: '/backend/card/export',
        method: 'get',
        params: query
    });
}

export function addCard(obj) {
    return ajax({
        url: '/backend/card',
        method: 'post',
        data: obj
    });
}

export function getCard(id) {
    return ajax({
        url: '/backend/card/' + id,
        method: 'get'
    })
}

export function enableCard(data) {
    return ajax({
        url: '/backend/card/enable',
        method: 'post',
        data : data
    })
}


export function disableCard(data) {
    return ajax({
        url: '/backend/card/disable',
        method: 'post',
        data : data
    })
}

export function deleteCard(data) {
    return ajax({
        url: '/backend/card/delete',
        method: 'post',
        data : data
    })
}


export function getCardNo(data) {
    return ajax({
        url: '/backend/card/no',
        method: 'post',
        data: data,
    })
}

export function makeCard(data) {
    return ajax({
        url: '/backend/card/make',
        method: 'post',
        data : data
    })
}

export function loginCard(data) {
    return ajax({
        url: '/backend/card/login',
        method: 'post',
        data : data
    })
}